class ResUsers {

  String? id;
  String? active;
  String? login;
  String? password;
  String? companyId;
  String? partnerId;
  String? createDate;
  String? signature;
  String? actionId;
  String? share;
  String? createUid;
  String? writeUid;
  String? writeDate;
  String? totpSecret;
  String? notificationType;
  String? odoobotState;
  String? odoobotFailed;
  String? saleTeamId;

  ResUsers({
    this.id,
    this.active,
    this.login,
    this.password,
    this.companyId,
    this.partnerId,
    this.createDate,
    this.signature,
    this.actionId,
    this.share,
    this.createUid,
    this.writeUid,
    this.writeDate,
    this.totpSecret,
    this.notificationType,
    this.odoobotState,
    this.odoobotFailed,
    this.saleTeamId,
  });

  ResUsers copyWith({
    String? id,
    String? active,
    String? login,
    String? password,
    String? companyId,
    String? partnerId,
    String? createDate,
    String? signature,
    String? actionId,
    String? share,
    String? createUid,
    String? writeUid,
    String? writeDate,
    String? totpSecret,
    String? notificationType,
    String? odoobotState,
    String? odoobotFailed,
    String? saleTeamId,
  }) {
    return new ResUsers(
      id: id ?? this.id,
      active: active ?? this.active,
      login: login ?? this.login,
      password: password ?? this.password,
      companyId: companyId ?? this.companyId,
      partnerId: partnerId ?? this.partnerId,
      createDate: createDate ?? this.createDate,
      signature: signature ?? this.signature,
      actionId: actionId ?? this.actionId,
      share: share ?? this.share,
      createUid: createUid ?? this.createUid,
      writeUid: writeUid ?? this.writeUid,
      writeDate: writeDate ?? this.writeDate,
      totpSecret: totpSecret ?? this.totpSecret,
      notificationType: notificationType ?? this.notificationType,
      odoobotState: odoobotState ?? this.odoobotState,
      odoobotFailed: odoobotFailed ?? this.odoobotFailed,
      saleTeamId: saleTeamId ?? this.saleTeamId,
    );
  }

  @override
  String toString() {
    return '''ResUsers{
      id: id,
      active: active,
      login: login,
      password: password,
      companyId: companyId,
      partnerId: partnerId,
      createDate: createDate,
      signature: signature,
      actionId: actionId,
      share: share,
      createUid: createUid,
      writeUid: writeUid,
      writeDate: writeDate,
      totpSecret: totpSecret,
      notificationType: notificationType,
      odoobotState: odoobotState,
      odoobotFailed: odoobotFailed,
      saleTeamId: saleTeamId,
    }''';
  }

  @override
  bool operator ==(Object other) => identical(this, other) || (
      other is ResUsers &&
          runtimeType == other.runtimeType
          && id== other.id
          && active== other.active
          && login== other.login
          && password== other.password
          && companyId== other.companyId
          && partnerId== other.partnerId
          && createDate== other.createDate
          && signature== other.signature
          && actionId== other.actionId
          && share== other.share
          && createUid== other.createUid
          && writeUid== other.writeUid
          && writeDate== other.writeDate
          && totpSecret== other.totpSecret
          && notificationType== other.notificationType
          && odoobotState== other.odoobotState
          && odoobotFailed== other.odoobotFailed
          && saleTeamId== other.saleTeamId
   );


  factory ResUsers.fromMap(Map<String, dynamic> map) {
    return new ResUsers(
      id: map['id'] as String?,
      active: map['active'] as String?,
      login: map['login'] as String?,
      password: map['password'] as String?,
      companyId: map['companyId'] as String?,
      partnerId: map['partnerId'] as String?,
      createDate: map['createDate'] as String?,
      signature: map['signature'] as String?,
      actionId: map['actionId'] as String?,
      share: map['share'] as String?,
      createUid: map['createUid'] as String?,
      writeUid: map['writeUid'] as String?,
      writeDate: map['writeDate'] as String?,
      totpSecret: map['totpSecret'] as String?,
      notificationType: map['notificationType'] as String?,
      odoobotState: map['odoobotState'] as String?,
      odoobotFailed: map['odoobotFailed'] as String?,
      saleTeamId: map['saleTeamId'] as String?,
    );
  }

  Map<String, dynamic> toMap() {
    // ignore: unnecessary_cast
    return {
      'id': this.id,
      'active': this.active,
      'login': this.login,
      'password': this.password,
      'companyId': this.companyId,
      'partnerId': this.partnerId,
      'createDate': this.createDate,
      'signature': this.signature,
      'actionId': this.actionId,
      'share': this.share,
      'createUid': this.createUid,
      'writeUid': this.writeUid,
      'writeDate': this.writeDate,
      'totpSecret': this.totpSecret,
      'notificationType': this.notificationType,
      'odoobotState': this.odoobotState,
      'odoobotFailed': this.odoobotFailed,
      'saleTeamId': this.saleTeamId,
    } as Map<String, dynamic>;
  }

  List toDomainList() {
    if(this==ResUsers()){
      return [['id','!=',null]];
    }
    // ignore: unnecessary_cast
    return [
      if(this.id!=null)['id','=',this.id],
      if(this.active!=null)['active','=',this.active],
      if(this.login!=null)['login','=',this.login],
      if(this.password!=null)['password','=',this.password],
      if(this.companyId!=null)['company_id','=',this.companyId],
      if(this.partnerId!=null)['partner_id','=',this.partnerId],
      if(this.createDate!=null)['create_date','=',this.createDate],
      if(this.signature!=null)['signature','=',this.signature],
      if(this.actionId!=null)['action_id','=',this.actionId],
      if(this.share!=null)['share','=',this.share],
      if(this.createUid!=null)['create_uid','=',this.createUid],
      if(this.writeUid!=null)['write_uid','=',this.writeUid],
      if(this.writeDate!=null)['write_date','=',this.writeDate],
      if(this.totpSecret!=null)['totp_secret','=',this.totpSecret],
      if(this.notificationType!=null)['notification_type','=',this.notificationType],
      if(this.odoobotState!=null)['odoobot_state','=',this.odoobotState],
      if(this.odoobotFailed!=null)['odoobot_failed','=',this.odoobotFailed],
      if(this.saleTeamId!=null)['sale_team_id','=',this.saleTeamId],
    ] as List;
  }

  Map<String, dynamic> toOdooMap() {
    // ignore: unnecessary_cast
    return {
      'id': this.id,
      'active': this.active,
      'login': this.login,
      'password': this.password,
      'company_id': this.companyId,
      'partner_id': this.partnerId,
      'create_date': this.createDate,
      'signature': this.signature,
      'action_id': this.actionId,
      'share': this.share,
      'create_uid': this.createUid,
      'write_uid': this.writeUid,
      'write_date': this.writeDate,
      'totp_secret': this.totpSecret,
      'notification_type': this.notificationType,
      'odoobot_state': this.odoobotState,
      'odoobot_failed': this.odoobotFailed,
      'sale_team_id': this.saleTeamId,
    } as Map<String, dynamic>;
  }

//</editor-fold>

}